home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsISearchService.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  130 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Robert John Churchill      <rjc@netscape.com>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  27.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. /*
  40.  
  41.   The Browser Search service
  42.  
  43. */
  44.  
  45. #include "nsISupports.idl"
  46. #include "nsIRDFDataSource.idl"
  47.  
  48. interface  nsIUnicodeDecoder;
  49.  
  50. [scriptable, uuid(1222e6f0-a5e3-11d2-8b7c-00805f8a7db6)]
  51. interface nsILocalSearchService : nsISupports
  52. {
  53. };
  54.  
  55. [scriptable, uuid(6bd1d803-1c67-11d3-9820-ed1b357eb3c4)]
  56. interface nsIInternetSearchService : nsISupports
  57. {
  58.   // constants set in the whichButtons out param of GetInternetSearchURL() 
  59.   const unsigned short kHaveNext = 1;
  60.   const unsigned short kHavePrev = 2;
  61.  
  62.   string      GetInternetSearchURL(in string searchEngineURI, in wstring searchStr, in short direction, in unsigned short pageNumber, out unsigned short whichButtons);
  63.   void      RememberLastSearchText(in wstring escapedSearchStr);
  64.   boolean      FindInternetSearchResults(in string url);
  65.   void      Stop();
  66.   void      ClearResults(in boolean flushLastSearchRef);
  67.   void      ClearResultSearchSites();
  68.   nsIRDFDataSource  GetCategoryDataSource();
  69.   void      AddSearchEngine(in string engineURL, in string iconURL,
  70.                          in wstring suggestedTitle, in wstring suggestedCategory);
  71. };
  72.  
  73. [noscript, uuid(7b171610-80ca-4d33-b16c-4186cd7b7e73)]
  74. interface nsIInternetSearchContext : nsISupports
  75. {
  76.   const unsigned long WEB_SEARCH_CONTEXT      = 1;
  77.  
  78.   // The download of the .src file for a *new* engine.
  79.   const unsigned long ENGINE_DOWNLOAD_NEW_CONTEXT = 2;
  80.  
  81.   // The download of the icon file for a new engine.
  82.   const unsigned long ICON_DOWNLOAD_NEW_CONTEXT = 3;
  83.  
  84.   // The head request to see if we need to update the engine.
  85.   const unsigned long ENGINE_UPDATE_HEAD_CONTEXT = 4;
  86.  
  87.   // The download of the .src file for an engine update.
  88.   const unsigned long ENGINE_DOWNLOAD_UPDATE_CONTEXT = 5;
  89.  
  90.   // The download of the icon file for an engine update.
  91.   const unsigned long ICON_DOWNLOAD_UPDATE_CONTEXT = 6;
  92.  
  93.   // attributes
  94.   readonly attribute unsigned long ContextType;
  95.  
  96.   // methods
  97.   nsIUnicodeDecoder  GetUnicodeDecoder();
  98.   nsIRDFResource    GetParent();
  99.   nsIRDFResource    GetEngine();
  100.   void      GetHintConst([shared] out wstring buffer);
  101.   void      AppendBytes(in string buffer, in long numBytes);
  102.   void      AppendUnicodeBytes(in wstring buffer, in long numUniBytes);
  103.   long      GetBufferLength();
  104.   void      GetBufferConst([shared] out wstring buffer);
  105.   void      Truncate();
  106. };
  107.  
  108. %{C++
  109.  
  110. #define NS_IINTERNETSEARCHDATASOURCECALLBACK_IID \
  111. { 0x88774583, 0x1edd, 0x11d3, { 0x98, 0x20, 0xbf, 0x1b, 0xe7, 0x7e, 0x61, 0xc4 } }
  112.  
  113. #define NS_IINTERNETSEARCHDATAOURCE_IID \
  114. { 0x6bd1d803, 0x1c67, 0x11d3, { 0x98, 0x20, 0xed, 0x1b, 0x35, 0x7e, 0xb3, 0xc4 } }
  115.  
  116. #define NS_ILOCALSEARCHDATASOURCE_IID \
  117. { 0x1222e6f0, 0xa5e3, 0x11d2, { 0x8b, 0x7c, 0x00, 0x80, 0x5f, 0x8a, 0x7d, 0xb6 } }
  118.  
  119. #define NS_LOCALSEARCH_SERVICE_CONTRACTID \
  120.     "@mozilla.org/browser/localsearch-service;1"
  121. #define NS_LOCALSEARCH_DATASOURCE_CONTRACTID \
  122.     "@mozilla.org/rdf/datasource;1?name=localsearch"
  123.  
  124. #define NS_INTERNETSEARCH_SERVICE_CONTRACTID \
  125.     "@mozilla.org/browser/internetsearch-service;1"
  126. #define NS_INTERNETSEARCH_DATASOURCE_CONTRACTID \
  127.     "@mozilla.org/rdf/datasource;1?name=internetsearch"
  128.  
  129. %}
  130.